﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.OpenGL.Native;

namespace Silvermoon.Shapes
{ 
    /// <summary>
    /// Backgroundshape that does not clip to scissor box.
    /// </summary>
    public class UnclippedBackgroundShape:BackgroundShape
    {
        public override void Render(Silvermoon.Core.Renderer renderer)
        {
            gl.Disable(Capability.ScissorTest);
            gl.Disable(Capability.ScissorBox);
            base.Render(renderer);
            gl.Enable(Capability.ScissorBox);
            gl.Enable(Capability.ScissorTest);
        }

        protected override Shape CreateClone()
        {
            return new UnclippedBackgroundShape();
        }
    }
}
